﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript" src="../../function.js"></script>
<title>ScanPath 遍历目录下的文件</title>
<style>
body{font-size:12px; font-family:Verdana,"宋体"}
.ts{ background:#fff; margin:0 0 40px 0;}
.ts th{ color:#7B797B; background:#DEDFDE; line-height:24px;}
.ts td {padding:6px 0;}
.name { font-size:16px; font-weight:bold; border-top:1px dashed #9C9A9C; border-bottom:1px dashed #9C9A9C; color:#316AC5;}
.canshu { background:#E7E7EF;}
.red{ color:#d60000;}
.green{ color:#006939;}
.blue{ color:#316AC5;}
.yufa{ border-top:1px dashed #9C9A9C;color:#316AC5;}
.fanhui{ border-bottom:1px dashed #9C9A9C;}
.lizi{ border-bottom:1px dashed #9C9A9C;}
.beizhu{ border-bottom:1px dashed #9C9A9C;}
</style></head><body>
<table class=ts border=0 cellSpacing=1 cellPadding=0 width="100%">
  
  <tr>
    <th width=100>命令名称：</TH>
    <td class=name><a name=Delay 
      ></A>ScanPath 遍历目录下的文件 </TD></TR>
  <tr>
    <th>命令功能：</TH>
    <td>遍历目录下的文件 </TD></TR>
  <tr>
    <th>参数说明：</TH>
    <td class=canshu><pre>参数1【必要】：字符串，指定遍历的目录
参数2【可选】：整数型，1代表遍历文件夹; 不填代表遍历文件</PRE></TD></TR>
  <tr>
    <th>返回值：</TH>
    <td class=fanhui>返回包含文件名的数组 </TD></TR>
  <tr>
    <th><span class=red>脚本例子：</SPAN> 
    </TH>
    <td class=lizi><PRE id=code>  
//遍历指定目录中的文件(返回数组)
Dim FileArr = shanhai.ScanPath(GetSdcardDir())
For Each v In FileArr
	TracePrint v
Next
//返回指定目录中的文件夹
FileArr = shanhai.ScanPath(GetSdcardDir(),1)
For Each v In FileArr
	TracePrint v
Next
</PRE>
      <script type=text/javascript src="../../write.js" 
      ></SCRIPT>
    </TD></TR></TABLE>
</body>
</html>